package org.itboys.mobile.entity.mongo;

import org.itboys.mongodb.entity.BaseMongoEntity;
import org.mongodb.morphia.annotations.Entity;

/**
 * 作者：jiangxiong
 * 日期：2017年5月8日
 * 描述：众包_消息_实体。
 *
 */
@Entity(value="ZhongBaoMessage", noClassnameStored=true)
public class ZhongBaoMessage extends BaseMongoEntity{
    private Long memberId;//消息归属人ID
    private String memberName;//消息归属人名称
    private String memberMobile;//消息归属人电话

    private Long senderId;//消息发送人ID
    private String senderName;//消息发送人名称
    private String senderMobile;//消消息发送人电话


    private Long projectId;//项目ID
    private String projectName;//项目名称
    //private String projectMobile;//项目电话
    private String title;//消息标题
    private String desc;//消息内容
    private Integer status;//消息状态，0未读，1已读
    private Integer type;//消息类型。1，审核申请消息，2，审核通过消息，3，审核驳回消息，4，报名申请消息，5，报名通过消息 6，报名驳回消息，7留言消息
    //private String remark;//回复内容
    private Long otherId;//关联业务ID。当前只有报名消息。
    public ZhongBaoMessage() {
    }

    public ZhongBaoMessage(Long memberId, String memberName, String memberMobile,
                           Long senderId, String senderName, String senderMobile,
                           Long projectId, String projectName, String title, String desc,
                           Integer status, Integer type,  Long otherId) {
        this.memberId = memberId;
        this.memberName = memberName;
        this.memberMobile = memberMobile;
        this.senderId = senderId;
        this.senderName = senderName;
        this.senderMobile = senderMobile;
        this.projectId = projectId;
        this.projectName = projectName;
        this.title = title;
        this.desc = desc;
        this.status = status;
        this.type = type;

        this.otherId = otherId;
    }

    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public String getMemberName() {
        return memberName;
    }

    public void setMemberName(String memberName) {
        this.memberName = memberName;
    }

    public String getMemberMobile() {
        return memberMobile;
    }

    public void setMemberMobile(String memberMobile) {
        this.memberMobile = memberMobile;
    }

    public Long getSenderId() {
        return senderId;
    }

    public void setSenderId(Long senderId) {
        this.senderId = senderId;
    }

    public String getSenderName() {
        return senderName;
    }

    public void setSenderName(String senderName) {
        this.senderName = senderName;
    }

    public String getSenderMobile() {
        return senderMobile;
    }

    public void setSenderMobile(String senderMobile) {
        this.senderMobile = senderMobile;
    }

    public Long getProjectId() {
        return projectId;
    }

    public void setProjectId(Long projectId) {
        this.projectId = projectId;
    }

    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Long getOtherId() {
        return otherId;
    }

    public void setOtherId(Long otherId) {
        this.otherId = otherId;
    }
    public String  getTypeStr(){
        String typeStr= "";
        if(type==null)return typeStr;

        switch (type) {
            case 1:
                typeStr="项目申请消息";
                break;
            case 2:
                typeStr="项目通过消息";
                break;
            case 3:
                typeStr="项目驳回消息";
                break;
            case 4:
                typeStr="报名申请消息";
                break;
            case 5:
                typeStr="报名通过消息";
                break;
            case 6:
                typeStr="报名驳回消息";
                break;
            case 7:
                typeStr="留言消息";
                break;
            case 8:
                typeStr="项目通知消息";
                break;
            default:
                break;
        }
        return typeStr;
    }
}
